<?php
/**
 * User: Do
 * Date: 7/2/14
 * Time: 10:50 AM
 */
Class View {
    function __construct(){}
    public function render($name, $data){
        if($data){
            foreach($data as $k=>$v){
                global $$k;
                $$k = $v;
            }
        }
        require_once 'views/'.$name.'.php';
    }
}